#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    // 设置局部样式
    ui->pushButton->setStyleSheet("QPushButton { font-size: 50px;}"); // 局部样式和全局样式会“叠加”起来
    ui->pushButton_2->setStyleSheet("QPushButton {color: green;}"); // 如果设置了冲突的样式，则局部样式会覆盖全局样式(局部样式的优先级更高)
}

Widget::~Widget()
{
    delete ui;
}

